The present invention relates to a surface defect inspection apparatus for radiating light on a surface to be inspected, and detecting the presence/absence of a surface defect such as a painting defect from light reflected by the surface.
In a manufacturing line of a vehicle such as an automobile, a vehicle body is normally painted in a painting station arranged in the manufacturing line. After the vehicle body is painted in the painting station, a painting defect caused by the painting process is inspected. The painting defect is conventionally inspected by a visual inspection of a person. In the visual inspection, a small defect portion must be found from a painted surface. For this reason, the visual inspection exerts a mentally and physically heavy load on an inspector.
As a technique for inspecting a painting defect not using a visual inspection of an inspector, for example, Japanese Patent Laid-Open No. 62-233710 discloses an inspection technique wherein light is radiated on a surface to be inspected of an object, light reflected by the surface is projected onto a screen, and a surface defect of the surface to be inspected is automatically detected on the basis of sharpness of the projected image.
Therefore, upon application of the technique disclosed in the above-mentioned prior art, a painting defect on a painted surface of a vehicle body can be automatically detected, and an inspector can be free from a conventional visual inspection operation.
When the surface inspection technique by means of light radiation disclosed in the above-mentioned prior art is applied to an automatic inspection of painting of a vehicle body, as shown in FIG. 1, the following inspection apparatus may be proposed. That is, this apparatus utilizes mirror-surface reflectance of a painted surface Y, and linear (or spot-like) light is radiated from a light source A.sub.1 onto the painted surface Y, thereby forming a light radiation region sufficiently smaller than a camera field F of a CCD camera B to be described below. Light reflected by the light radiation region is received by the CCD camera B.
In this inspection apparatus, a received-light image C formed by the CCD camera B is as shown in FIG. 2, and the light radiation region of the painted surface Y is detected as a bright line D in the entirely dark received-light image C covering the camera field F. In this case, when a painting defect portion X assumed to have a spherical surface is present in the light radiation region, regular reflection occurs on the spherical surface of the painting defect portion X. More specifically, on the painting defect portion X, a surrounding background portion including the defect portion X is projected as a relatively wide range including the light source A.sub.1 in a reduced scale. The image projected on the painting defect portion X includes the light source A.sub.1 which is bright but is projected in a reduced scale, and a wide dark surrounding portion. Therefore, paying attention to an incident light amount of the painting defect portion X with respect to a camera light-receiving surface, the light amount is decreased in a portion corresponding to the dark surrounding portion around the light source A , and as a result, the surface defect portion X is projected in black in the bright line D.
In this manner, the black point is discriminated by the image processing technique, thereby allowing detection of the painting defect portion X. According to this inspection apparatus, since light is linearly radiated on the painted surface Y in a narrow range, even if a radiation light amount is small, a regular reflection direction of light incident on the light radiation region is changed by the painting defect portion X, and a clear light amount difference received by the camera B is formed between the painting defect portion X and the remaining portion. As a result, a small defect can be detected.
However, since light radiation is performed within a narrow range, the light radiation region is too small for the camera field F, while the defect portion X which can be detected by the camera B must be present inside or near the light radiation region (i.e., a line image in the received-light image). For this reason, a surface inspection using only a portion of the camera field F can only be performed, resulting in poor inspection efficiency.
When an object to be inspected is a painted surface of a vehicle body, the inspection is performed while moving the light source A.sub.1 and the CCD camera B along the painted surface of the vehicle body by a robot apparatus. However, the vehicle body is constituted by many curved surfaces having different curvatures. For this reason, when an inspection portion is moved to these curved surface portions, a linear radiation pattern formed on the vehicle body surface by the light source A.sub.1, and hence, the line image D in the received-light image C of the camera B is also distorted, as shown in FIG. 3. As a result, in the worst case, the line image D falls outside the camera field F. For this reason, a normal inspection is disturbed.
As for a vehicle body of a vehicle such as an automobile, it is difficult to perform a normal inspection of a painted surface, and the robot apparatus must undergo complicated control to allow the line image D to always fall within the camera field F.
In order to solve the above-mentioned problem, as shown in FIG. 4, the painted surface Y is irradiated with light from a light source A.sub.2 having a wide light radiation region, so that light is two-dimensionally, i.e., widely radiated in a range equivalent to or larger than the camera field F. The wide light radiation region is detected by the camera B.
However, when the painted surface Y is irradiated with light over a wide range, a radiation light amount is considerably increased, and halation of light on the painting defect portion X occurs. As a result, the small painting defect portion X cannot be clearly detected. More specifically, an image projected on the painting defect portion X almost corresponds to only the light source A.sub.2, and the painting defect portion X is also projected bright. Therefore, paying attention to an incident light amount of the painting defect portion X with respect to a camera light-receiving surface, a light amount on a portion irradiated with light from the light source A.sub.2 becomes almost equal to a light amount on a portion projected on the painting defect portion X. As a result, the bright surface defect portion X is projected in the bright line D, and the CCD camera B cannot clearly detect the small painting defect portion X.